<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%--
  Created by IntelliJ IDEA.
  User: GiantM
  Date: 2018/3/8
  Time: 11:02
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>配件添加</title>
    <base href="<%= request.getContextPath()%>/">
    <link href="bootstrap/dist/css/bootstrap.css" rel="stylesheet">
</head>
<body>
    <div class="container">
        <form:form method="post" action="carparts/add" modelAttribute="carParts" enctype="multipart/form-data">
            <table class="table">
                <tr>
                    <td>配件图片</td>
                    <td><input type="file" name="file"><br></td>
                </tr>
                <tr>
                    <td>配件名字</td>
                    <td><input type="text" name="pieceName"><br></td>
                </tr>
                <tr>
                    <td>配件代号</td>
                    <td><input type="text" name="pieceEname"><br></td>
                </tr>
                <tr>
                    <td>数量</td>
                    <td><input type="text" name="pieceNum"><br></td>
                </tr>
                <tr>
                    <td>供应商</td>
                    <td><input type="text" name="pieceSupply"><br></td>
                </tr>
                <tr>
                    <td>地址</td>
                    <td><input type="text" name="supplyAddress"><br></td>
                </tr>
                <tr>
                    <td>联系人</td>
                    <td><input type="text" name="supplyPerson"><br></td>
                </tr>
                <tr>
                    <td>联系电话</td>
                    <td><input type="text" name="supplyTel"><br></td>
                </tr>
                <tr>
                    <td>销售单价</td>
                    <td><input type="text" name="priceDan"><br></td>
                </tr>
                <tr>
                    <td>采购单价</td>
                    <td><input type="text" name="priceCai"><br></td>
                </tr>

                <tr>
                    <td>配件类型</td>
                    <td>
                        <form:select path="type.partsId" items="${types}" itemValue="partsId" itemLabel="partsName"></form:select>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <input type="submit" name="添加">
                    </td>
                </tr>
            </table>
        </form:form>
    </div>
</body>
</html>
<script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
<script src="bootstrap/dist/js/bootstrap.js"></script>
